#ifndef Z_INC_SERIAL_H
#define Z_INC_SERIAL_H

#include <zephyr/types.h>

#define SERIAL_BLOCK_SIZE 128 // 序列化缓存区大小
#define SERIAL_RX_BLOCK_NUM 3
#define SERIAL_TX_BLOCK_NUM 5
#define SERIAL_MSGQ_BLOCK_NUM 10

typedef int (*rx_proccess_t)(uint8_t *data, uint16_t len);

struct serial_inst
{
    int (*tx)(const uint8_t *const data, uint16_t len);
};

struct serial_inst *serial_init(rx_proccess_t rx_proccess_func);

#endif // Z_INC_SERIAL_H
